#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>

int main()
{
    int id = fork();

    if(id == 0) // 子进程
    {
        execl("/usr/bin/ls","ls","-l","-a","--color=auto",NULL);
        exit(1); // must fail
    }

    wait(NULL);
    return 0;
}
